﻿using System.Collections.Generic;
using System.Runtime.Serialization;
using RayDen.Library.Entity.Interface;

namespace RayDen.Library.Entity.Frames {
    [DataContract]
    public class FrameDescription : ConfigurableEntity, IRayDenLibraryFrame {

        public string FrameName { get; set; }
        [DataMember]
        public string WorkingDir { get; set; }
        public IEnumerable<IFrameElement> Elements { get { return elements; } }

        [DataMember]
        protected internal List<FrameElement> elements;

        public FrameDescription() {
            this.elements = new List<FrameElement>();
        }

        public void AddNew(FrameElement element) {
            this.elements.Add(element);
            element.Owner = this;
        }

    }
}